import request from '@/utils/request'

// 查询商城秒杀活动列表
export function listSekill(query) {
  return request({
    url: '/manager/promotion/seckill/list',
    method: 'get',
    params: query
  })
}

// 查询商城秒杀活动
export function getSeckill(id) {
  return request({
    url: '/manager/promotion/seckill/' + id,
    method: 'get'
  })
}

// 新增商城秒杀活动
export function addSeckill(data) {
  return request({
    url: '/manager/promotion/seckill',
    method: 'post',
    data: data
  })
}

// 修改商城秒杀活动
export function updateSeckill(data) {
  return request({
    url: '/manager/promotion/seckill',
    method: 'put',
    data: data
  })
}

// 删除商城秒杀活动
export function delSeckill(id) {
  return request({
    url: '/manager/promotion/seckill/' + id,
    method: 'delete'
  })
}

// 启用商城秒杀活动
export function enableSeckill(id) {
  return request({
    url: '/manager/promotion/seckill/enable/' + id,
    method: 'post'
  })
}

// 关闭商城秒杀活动
export function closePintuan(ids) {
  return request({
    url: '/manager/promotion/pintuan/close/' + ids,
    method: 'post'
  })
}

